package com.jzg.jcptadmin.Utils;

import android.widget.Toast;

import com.jzg.jcptadmin.app.AppContext;

public class MyToast {
	private static Toast toast;
	public static void showLong(String content){
		if (toast == null) {
			toast = Toast.makeText(AppContext.getContext(), content, Toast.LENGTH_LONG);
		} else {
			toast.setText(content);
		}
		toast.show();
	}
	public static void showShort(int resId){
		if (toast == null) {
			toast = Toast.makeText(AppContext.getContext(), resId, Toast.LENGTH_SHORT);
		} else {
			toast.setText(resId);
		}
		toast.show();
	}

	public static void showShort(String content){
		if (toast == null) {
			toast = Toast.makeText(AppContext.getContext(), content, Toast.LENGTH_SHORT);
		} else {
			toast.setText(content);
		}
		toast.show();
	}
	public static void showLong(int resId){
		if (toast == null) {
			toast = Toast.makeText(AppContext.getContext(), resId, Toast.LENGTH_LONG);
		} else {
			toast.setText(resId);
		}
		toast.show();
	}
}
